package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.entity.PrizePool;
import com.ruoyi.common.core.domain.entity.UserPoints;
import com.ruoyi.common.core.domain.entity.UserPointsLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 参数配置 数据层
 *
 * @author ruoyi
 */
@Mapper
@Repository
public interface PointsMapper {
/**
 * 保存积分记录
 */
public void insertUserPointsLog(UserPointsLog userPointsLog);

/**
 * 查询积分记录
 */
public List<UserPointsLog> selectUserPointsLogByUserId(@Param("userId") Long userId);

/**
 * 保存总积分
 */
public void insertUserPoints(UserPoints userPoints);

/**
 * 查询总积分
 */
public UserPoints selectUserPointsByUserId(@Param("userId") Long userId);

/**
 * 更新总积分
 */
public void updateUserPoints(UserPoints userPoints);

/**
 * 查询等级为2的用户id
 */
public List<Long> selectLevelTwoUserId();
}
